<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
</head>
<body>
<h2>主题分析</h2>
<form action="/analyze" name="form1" method="post">
    请输入原文：
    <textarea id="acticle" name="acticle" cols="100" rows="5"></textarea>
    <br>
    分析后的主题
    <textarea id="result" name="acticle" cols="100" rows="5"></textarea>
    <input type="button" value="主题分析" onclick="analyze()">
</form>
</body>
</html>
<%--<script  type="text/javascript"  src="/js/jquery-1.11.3.min.js"/>--%>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="application/javascript">
    function analyze() {
        $.ajax({
            type: "post",
            url: "/analyze",
            data: {
                acticle: $("#acticle").val()
            },
            dataType: "json",
            success: function (data) {
                $("#result").val(JSON.stringify(data));
            }
        });
    }
</script>